@use '@scss/common' as *;

@mixin formInput() {
  all: unset;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-family: var(--font-body);
  width: 100%;
  border: 1px solid var(--theme-elevation-250);
  background: var(--theme-elevation-50);
  color: var(--theme-elevation-800);
  line-height: var(--base);
  padding: var(--base);

  @include data-theme-selector('light') {
    background: var(--theme-elevation-0);
  }

  &::-moz-placeholder,
  &::-webkit-input-placeholder {
    color: var(--theme-elevation-400);
    font-weight: normal;
  }

  &:hover {
    border-color: var(--theme-elevation-250);
  }

  &:focus,
  &:active {
    border-color: var(--theme-elevation-400);
    outline: 0;
  }

  &:disabled {
    background: var(--theme-elevation-200);
    color: var(--theme-elevation-450);

    &:hover {
      border-color: var(--theme-elevation-250);
    }
  }
}

.description {
  @include small;
  & {
    margin-top: 0.5rem;
    color: var(--theme-elevation-400);
  }
}
